package _9994FuWuDingWeiQo;

/**
 * @Test: 服务定位器模式 测试类
 * @author: ZBoHang
 * @time: 2021/9/18 13:14
 */
class Test {
    public static void main(String[] args) {
        Service srviceOne = ServiceLocator.getService("ServiceOne");
        srviceOne.execute();
        Service serviceTwo = ServiceLocator.getService("ServiceTwo");
        serviceTwo.execute();

        srviceOne = ServiceLocator.getService("ServiceOne");
        srviceOne.execute();
        serviceTwo = ServiceLocator.getService("ServiceTwo");
        serviceTwo.execute();

        Service serviceThree = ServiceLocator.getService("ServiceThree");
        serviceThree.execute();
    }
}
